using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Open.Data.Persistence.Tools
{
    public partial class WizardBaseForm: Form
    {
        WizardResult _result;

        public WizardBaseForm()
        {
            InitializeComponent();
            _result = WizardResult.Cancel;
        }

        public virtual WizardResult WizardResult
        {
            get
            {
                return _result;
            }
            set
            {
                _result = value;
            }
        }

        protected virtual void OnNextClick(object sender, EventArgs e)
        {
            _result = WizardResult.Next;
            this.Close();
        }

        protected virtual void OnCancelClick(object sender, EventArgs e)
        {
            _result = WizardResult.Cancel;
            this.Close();
        }

        protected virtual void OnPreviousClick(object sender, EventArgs e)
        {
            _result = WizardResult.Previous;
            this.Close();
        }
    }
}